﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NVSecurity.Models;
namespace NVSecurity.Controllers
{
    public class ServiceController : Controller
    {
        NVSecurityEntities db = new NVSecurityEntities();
        //
        // GET: /Service/

        public ActionResult Index()
        {
            return View();
        }
        public ActionResult _GetServiceMenu()
        {
            var serviceList = db.Services.ToList();
            return PartialView(serviceList);
        }
        public ActionResult GetServiceList()
        {
            var serviceList = db.Services.ToList();
            return View(serviceList);
        }
        public ActionResult Detail(int id)
        {
            var service = db.Services.Find(id);
            return View(service);
        }
        public ActionResult GetServiceHomeList()
        {
            var serviceList = db.Services.Take(4).ToList();
            return PartialView(serviceList);
        }
    }
}
